<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>百钱买百鸡</title>
	</head>
	<body>
		<script type="text/javascript">
			for (var a = 0; a <= 20; a++) {
				for (var b = 0; b <= 33; b++) {
					c = 100 - a - b;
					if (a * 5 + b * 3 + c / 3 == 100) {
						document.write("公鸡" + a + "只,母鸡" + b + "只,小鸡" + c + "只<br/>");
					}
				}
			}
		</script>
	</body>
</html>
